package com.example.drug.service.impl;

import com.example.drug.domain.Sales;
import com.example.drug.mapper.SalesMapper;
import com.example.drug.service.SalesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 销售记录服务实现类
 *
 * @author [你的名字]
 * @date [具体日期]
 */
@Service
public class SalesServiceImpl implements SalesService {

    @Autowired
    private SalesMapper salesMapper;

    @Override
    public List<Sales> selectAllSales() {
        return salesMapper.selectAllSales();
    }

    @Override
    public List<Sales> selectSalesByParam(Long buyerId) {
        return salesMapper.selectSalesByParam(buyerId);
    }

    @Override
    public Sales selectSalesById(Long id) {
        return salesMapper.selectSalesById(id);
    }

    @Override
    public int insertSales(Sales sales) {
        return salesMapper.insertSales(sales);
    }

    @Override
    public int updateSales(Sales sales) {
        return salesMapper.updateSales(sales);
    }

    @Override
    public int deleteSalesById(Long id) {
        return salesMapper.deleteSalesById(id);
    }
}
